 <script type="text/javascript">
  function isWeiXin(){
    var ua = window.navigator.userAgent.toLowerCase();
    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
        return true;
    }else{
        return false;
    }
  }
  function getQueryString(name){
      var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
      var r = window.location.search.substr(1).match(reg);
      if(r!=null)return  unescape(r[2]); return null;
  }

  function getCookie(name){
    var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
    if(arr=document.cookie.match(reg))
    return unescape(arr[2]);
    else
    return null;
  }

  function gotoAuth(){
      var hrefWithoutHash = location.href.split('#')[0];
      location.replace("http://cas.winnovator.cn/auth/preAuth?appId=1783791821429760&redirect=" + hrefWithoutHash);
  }

  var ssoToken = getCookie("SSO-TOKEN");
  if(!ssoToken){
      gotoAuth();
  }

  var AppStorage = new function() {

      this.setValueInLocalStorage = function(t, a) {
          localStorage.setItem(t, a)
      }
      ,
      this.getValueInLocalStorage = function(t) {
          return localStorage.getItem(t)
      }
      ,
      this.removeValueInLocalStorage = function(t) {
          localStorage.removeItem(t)
      }
  }
</script>
<!doctype html> <html lang=zh-cmn-Hans> <head> <meta http-equiv=Content-Type content="text/html; charset=UTF-8"> <title>亲子关系综合评估</title> <meta content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1" name=viewport> <meta content="IE=edge,chrome=1" http-equiv=X-UA-Compatible> <meta name=apple-mobile-web-app-capable content=yes> <meta http-equiv=Cache-Control content="no-cache, no-store, must-revalidate"> <meta http-equiv=Pragma content=no-cache> <meta http-equiv=Expires content=0> <meta http-equiv=cache-control content="max-age=0"> <meta http-equiv=expires content="Tue, 01 Jan 1980 1:00:00 GMT"> <meta name=apple-mobile-web-app-status-bar-style content=black> <link rel="shortcut icon" href=http://img.yoparent.com/wp-content/uploads/2015/07/favicon.png> <link rel=stylesheet href=styles/main25.css> <link type=text/css rel=stylesheet href=/scripts/test/success.css> <script src=scripts/vendor22.js></script> <script type=text/javascript src=/scripts/jquery-ui.min.js></script> <script type=text/javascript src=/scripts/test/dragslider25.js></script> <script type=text/javascript src=/scripts/test/jquery.ui.touch-punch.min.js></script> <style>
      .btn-pass{
        width: 100%;
        height: 55px;

        bottom: 10px;

        z-index: 100;
        margin-top: 40%;
        position: relative;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
      }

      .btn-pass .btn{
        margin-top: 50px;
      }

      .continue-btn-wrap{
        width: 100%;
        height: 55px;

        bottom: 10px;

      }
      .questionCaption{
        font-weight: 900;
        color: #b2ed38;
      }

      .my-page-wrapper{
        height:100%;
      }
      .img-cover-title{
        padding-top:10px;
      }

      .img-cover .info{
        position: absolute;
        z-index: 2000;
        bottom: 0;
        left: 0;
        /*background-color: #b2ed38;*/
        font-size: 16px;
        padding: 5px;
        color:  #FFF;

      }

      .highLight{
        color: #b2ed38 !important;
      }
      .unhighLight{
        color: #acb0b9;
      }
      .masker{
        position: absolute;
        background-color: #000;
        opacity: 0.4;
        width: 100%;
        height: 100%;
      }

      .axisLabel{
        font-size: 16px;
      }
      .axisLabel .middle{
        padding-left: 50%;
        margin-left: -95px;
      }

	.ui-draggable{

height: 20px;
background-color: #b2ed38;
}
    </style> <script language=text/template id=result-tpl style=display:none;>
        <img src="<%=data.data.url%>" style="width: 100%;height: auto" />
        <!--<h2 style="text-align: center;"><%=data.data.title%></h2>-->
        <div>
          <%=data.data.desc%>
        </div>
    </script> <script language=text/template id=share-description-tpl style=display:none;>
      你和孩子在亲子关系方面认识的匹配程度<%=data.data.title%>！
    </script>  <script language=text/template id=under-tpl style=display:none;>

      <div class="content-wrap full-page" id="content-wrap" attr-full-page>
        <ul class="content" id="content" attr-content>
          <li attr-page attr-cover>
            <div class="img-cover" img-src="<%=img_src%>"
                 img-width="<%=imgWidth%>"
                 img-height="<%=imgHeight%>"
                 cover-img>
              <img class="hide"/>
            </div>
            <h1 class="hide" cover-title><%=title%></h1>
            <div class="cover-wrapper" id="cover-wrapper" cover-wrapper>
              <ul class="desc cover-scroller hide" style="font-size: 16px;line-height: 25px;" id="cover-scroller" cover-desc>
                <li><div style="font-size: 20px;"><%=description%></div></li>
              </ul>
            </div>
            <div class="btn-wrap">
              <div class="btn bg-primary hide" id="start" cover-btn>开始测试</div>
            </div>
            <div class="power">powered&nbsp;by&nbsp;优儿学堂</div>
          </li>

          <!--父母页-->
          <li attr-page attr-cover data-id="select_parent">

            <div class="btn-pass" style="z-index: 100;">

              <div class="btn bg-primary show animated lightSpeedIn passContinue highLight" disable="0" >父母</div>

              <div class="btn bg-primary show animated second lightSpeedIn unhighLight" disable="1" >孩子</div>
            </div>
          </li>
          <!--父母页 end-->

          <%_.each(questions, function(oneQuestion,qIndex){%>
          <li class="page-content-wrapper" attr-page attr-main  data-id="<%=oneQuestion.id%>">
            <div class="my-page-wrapper">
              <ul>
                <li>
                  <!--题目的头部-->
                  <!--添加遮罩层-->
                  <div class="img-cover hide" img-width="<%=oneQuestion.imgWidth%>" img-height="<%=oneQuestion.imgHeight%>"
                       main-img img-src="<%=oneQuestion.img_src%>">
                    <span class="title-name" ></span>
                    <div class="masker"></div>
                    <div class="info">
                      <span class="questionLable"><%=oneQuestion.label%>: </span><span class="questionIndex"><%=qIndex%12+1%>/12</span>
                    </div>
                  </div>
                  <!--题目的头部end-->

                  <div class="img-cover-title hide draw-delay" style="font-size: 19px;margin-bottom: 20px;">
                    <span class="caption" style="padding: 10px"><%=oneQuestion.caption%></span>
                  </div>

                  <!--题目的选项-->
                  <%var answers = oneQuestion.answerAs%>
                  <div class="answers-content-wrapper wrapper hide draw-delay" answers-wrapper>
                    <ul class="answers scroller" id="answers" answers-num=<%=answers.length%> main-answers>
                      <%_.each(answers, function(oneAnswer,aIndex){%>
                      <li class="hr padding-tb" data-results='<%=JSON.stringify(oneAnswer.results)%>'
                          answer-item disable="0" id="<%=oneAnswer.id%>" qid="<%=oneQuestion.id%>">
                        <%=oneAnswer.caption%>
                      </li>
                      <%});%>
                    </ul>
                  </div>
                  <!--题目的选项 end-->

                  <!--滑块显示的题目选项-->
                  <div class="sliderBox draw-delay" data-qid="<%=oneQuestion.id%>" data-mul-img = "0" data-selectindex="1">
                    <div class="axisBox">
                      <ol class="range rangeTop"></ol>
                      <ol class="range rangeBottom"></ol>
                      <div class="bar ui-draggable ui-draggable-handle">
                        <i style="margin-left: 45%;"></i> <i></i><i></i>
                      </div>
                    </div>
                    <div class="axisLabel">
                      <span class="left" data-aid="<%=oneQuestion.answerBs[0].id%>"><%=oneQuestion.answerBs[0].caption%></span>
                      <span class="middle" data-aid="<%=oneQuestion.answerBs[1].id%>"><%=oneQuestion.answerBs[1].caption%></span>
                      <span class="right" data-aid="<%=oneQuestion.answerBs[2].id%>"><%=oneQuestion.answerBs[2].caption%></span>
                    </div>
                  </div>
                  <!--滑块显示的题目选项 end-->

                  <br/>
                  <div class="continue-btn-wrap  hide draw-delay" style="z-index: 100; display:none;">
                    <%if(questions.length-1 !== qIndex){%>
                    <div class="btn bg-primary show animated lightSpeedIn continue unhighLight" disable="0" >继续</div>
                    <%}else{%>
                    <div class="btn bg-primary show animated lightSpeedIn continue unhighLight" disable="0" >查看结果</div>
                    <%}%>
                  </div>
                </li>
              </ul>

            </div>
          </li>
          <%if(qIndex === 11){%>
          <!--父母页-->
          <li attr-page attr-cover data-id="select_child">

            <div class="btn-pass" style="z-index: 100;">

              <div class="btn bg-primary show animated lightSpeedIn unhighLight" disable="1" >父母</div>

              <div class="btn bg-primary show animated second lightSpeedIn passContinue highLight" disable="0" >孩子</div>

              父母不要偷看呦～
            </div>
          </li>
          <!--父母页 end-->

          <%}%>
          <%});%>
          <li attr-page attr-result>
            <div class="cal-wrap">
              <div class="i-box-1 circle animated scaleCirl infinite">

              </div>
              <div class="i-box-2 circle animated scaleCirr infinite">

              </div>
              <div class="text">正在计算结果...</div>
            </div>
            <div class="power">powered&nbsp;by&nbsp;优儿学堂</div>
          </li>
        </ul>
      </div>
    </script>  <script src=scripts/data/data25.js></script> <script src=scripts/main25.js></script>

    <script>
        var paperId = "view25";
        window.eventLogger = {

            log: function(category, action, label){
                category = paperId + "_" + category;
                action = paperId + "_" + action;
                label = paperId + "_" + label;

                try {
                    _hmt.push(["_trackEvent", category, action, label, 0])
                } catch (e) {}

                $.get("http://logger.yoparent.cn/log.html?category=" + category + "&action=" + action + "&label=" + label + "&token=" + AppStorage.getValueInLocalStorage("scale-token"));
            }
        }
    </script>

</head> <body> <!--[if lt IE 10]>
 <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
 <![endif]--> <div class=container id=container></div> <div class="ending full-page hide"> <div class=mesg> 让朋友们也来试试！ <div class="share icon-redo2"></div> </div> </div> <div class="orientation full-page hide"> <div class=orientation-wrap> <div class="loading icon-spinner"></div> <div class=mesg>请使用竖屏浏览，体验绝佳！</div> </div> </div> <div class="full-page result-box hide"> <div class=result-wrapper id=result-wrapper result-wrapper> <ul class=desc id=result-scroller> <li> <div class=result-img result-img> <span class=title></span> </div> </li> <li result-desc></li>

<li class=result-expert>  <br> <span style="font-size: 14px;">更多测试请关注</span>   <div style="text-align: center">
    <img src="http://static.winnovator.cn/scale/985747410.jpg" style="width: auto; height: 150px;">
</div> </li>



<li> </li> </ul> </div> <div class=btn-wrap result-btn>  <div class="btn bg-primary" id=share>晒结果</div> </div> <div class=power_result> <div class=text> powered&nbsp;by&nbsp;优儿学堂 </div> <div class=text> ©版权所有&nbsp;&nbsp;侵权必究 </div> </div> </div> <script type=text/template id=quiz-data style=display:none;> </script> <script type=text/javascript>
      var yoparent_token = "1xzqkxz377o5596qmbjwlkvsl";
      var yoparent_start_time = "1436603587600";
    </script> <script type=text/javascript>
      var data_tpl = null;
      var resultUrl = "http://123.59.44.69:7070/yoparent/scale/result";
      YoQuiz.run(
        data_tpl,
        "#container",
        "#under-tpl",
        {
          nextPageTime: 500,
          bgImg: "",
          coverDesc: { duration: 900, animate: "zoomIn" },
          mainCoverImg: { duration: 0, animate: "zoomIn" },
          mainAnswers: { duration: 650, animate: "fadeInUp" },
          nextPageWaitingTime:500
        }
      );
      $('.continue-btn-wrap').css('top', window.innerHeight - 100 + 'px').css('position', 'absolute');

      var quizId=25;
      $.ajax({type:'get',url:'http://123.59.44.69:7070/yoparent/scale/initData?quizId='+ quizId +'&url=' + encodeURIComponent(location.href.split('#')[0])+ '&r=' + Math.random(),success:function(data){
        var configData =eval('(' + data + ')');
        sysconfig(configData);
        wxconfig(configData);
      }});
//
    function sysconfig(data){
        var _token = AppStorage.getValueInLocalStorage("scale-token");
        if(!_token){
            AppStorage.setValueInLocalStorage("scale-token", data.token);
        }
        window.yoparent_token = data.token;
        window.yoparent_start_time = parseInt(data.startTime);
    }

    function wxconfig(data){
        wx.config({
            debug: false,
            appId: data.singatureParm.appId,
            timestamp: parseInt(data.singatureParm.timestamp),
            nonceStr: data.singatureParm.nonceStr,
            signature: data.singatureParm.signature,
            jsApiList: ["onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ"]
        });

        wx.ready(function(){
            wx.checkJsApi({
                jsApiList: ['chooseImage'],
                success: function(res) {}
            });
            wx.onMenuShareTimeline({
                title: '亲子关系综合评估',
                link: 'http://scale.yoparent.cn/view25.html',
                imgUrl: 'http://static.winnovator.cn/common/yoparent_share_logo.png',
                success: function () {
                    eventLogger && eventLogger.log("timeline_success", "share", "timeline");
                },
                cancel: function () {
                    eventLogger && eventLogger.log("timeline_cancel", "share", "timeline");
                }
            });

            wx.onMenuShareAppMessage({
                title: '亲子关系综合评估',
                desc: '你是否拥有一个温暖的家庭氛围？你和孩子的关系怎么样？也许从你的角度和孩子的角度体会与感受到的不尽相同哦~这个测评将从你自己的孩子的角度全面地评估你的家庭亲子关系和家庭氛围~（测试将分为家长部分和孩子部分，适用年龄范围：3-12岁儿童及家长）',
                link: 'http://scale.yoparent.cn/view25.html',
                imgUrl: 'http://static.winnovator.cn/common/yoparent_share_logo.png',
                type: 'link',
                dataUrl: '',
                success: function () {
                    eventLogger && eventLogger.log("group_success", "share", "group");
                },
                cancel: function () {
                    eventLogger && eventLogger.log("group_cancel", "share", "group");
                }
            });
        });
    }

    </script> <script type=text/javascript src=http://res.wx.qq.com/open/js/jweixin-1.0.0.js></script>
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "//hm.baidu.com/hm.js?061e31ddbdbd77c0403205c71bf52730";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
</body> </html>
